class Person {
    private String name;

    public Person(String name) {
        this.name = name;
    }

    // 人开车的行为，接收交通工具对象作为参数
    public void drive(Vehicle vehicle) {
        System.out.println(name + "开车去公司，使用的交通工具是：" + vehicle.getType());
    }
}

class Vehicle {
    private String type;

    public Vehicle(String type) {
        this.type = type;
    }

    public String getType() {
        return type;
    }
}

public class TestDrive {
    public static void main(String[] args) {
        Person zhangSan = new Person("张三");
        Vehicle car = new Vehicle("汽车");
        zhangSan.drive(car);
    }
}